<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="org.apache.shiro.web.filter.authc.FormAuthenticationFilter" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<!DOCTYPE >
<html>
<head>
    <meta charset="utf-8">
    <title>${fns:getConfig('productName')}</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
</head>
<body>
<div id="section_container">
    <header>
        <h1 class="title">${fns:getConfig('productName')}</h1>
    </header>
    <article data-scroll="true" id="login_article">
        <div class="indented" id="bb">
            <div class="input-group">
                <div class="input-row">
                    <label for="username">账号</label>
                    <input type="text" id="username" name="username" placeholder="请填写登录账号">
                </div>
                <div class="input-row">
                    <label for="password">密码</label>
                    <input type="password" id="password" placeholder="请填写登录密码">
                </div>
            </div>
            <button id="btn" class="submit block" data-icon="key">登陆</button>
        </div>
    </article>
</div>
<script type="text/javascript" src="${ctxStatic}/person/js/jquery-1.6.2.min.js"></script>
<script type="text/javascript">
    $("#btn").click(function (){
        alert($("#username").val())
        alert(555)
        alert($("#password").val())
        alert(666)
        if($("#username").val()==''){
          alert("请填写账号")
            /*console.log("请填写账号")*/
        }else if($("#password").val()==''){
            alert("请填写密码")

        } else {
            $.ajax({
                url: "${ftx}//shop/bb",
                dataType: 'json',
                data:{password:$("#password").val(),username:$("#username").val()},
                cache: false,
                success: function (data) {
                    alert(data);
                    if(data.status==2){
                        alert(data.message);
                    }else if (data.status==1){
                        alert(data.message);
                    } else{
                        window.location.href="modules/moblieshop/person/index.jsp";
                    }
                }
            })
        }
    });
</script>
</body>
</html>